Integrand size = 29, antiderivative size = 325 \[ \int \frac {(f+g x)^2 \sqrt {a+b x+c x^2}}{d+e x} \, dx=-\frac {\left (b^2 e^2 g^2-8 c^2 (e f-d g)^2-2 b c e g (2 e f-d g)-2 c e g (4 c e f-2 c d g-b e g) x\right ) \sqrt {a+b x+c x^2}}{8 c^2 e^3}+\frac {g^2 \left (a+b x+c x^2\right )^{3/2}}{3 c e}+\frac {\left (\left (8 c^2 d^2-b^2 e^2-4 c e (b d-a e)\right ) g (4 c e f-2 c d g-b e g)-4 c e (2 c d-b e) \left (2 c e f^2-b d g^2\right )\right ) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{16 c^{5/2} e^4}+\frac {\sqrt {c d^2-b d e+a e^2} (e f-d g)^2 \text {arctanh}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e^4} \]
[Out]
Time = 0.42 (sec) , antiderivative size = 325, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {1667, 828, 857, 635, 212, 738} \[ \int \frac {(f+g x)^2 \sqrt {a+b x+c x^2}}{d+e x} \, dx=\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (g \left (-4 c e (b d-a e)-b^2 e^2+8 c^2 d^2\right ) (-b e g-2 c d g+4 c e f)-4 c e (2 c d-b e) \left (2 c e f^2-b d g^2\right )\right )}{16 c^{5/2} e^4}+\frac {(e f-d g)^2 \sqrt {a e^2-b d e+c d^2} \text {arctanh}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{e^4}-\frac {\sqrt {a+b x+c x^2} \left (b^2 e^2 g^2-2 c e g x (-b e g-2 c d g+4 c e f)-2 b c e g (2 e f-d g)-8 c^2 (e f-d g)^2\right )}{8 c^2 e^3}+\frac {g^2 \left (a+b x+c x^2\right )^{3/2}}{3 c e} \]
[In]
[Out]
Rule 212
Rule 635
Rule 738
Rule 828
Rule 857
Rule 1667
Rubi steps \begin{align*} \text {integral}& = \frac {g^2 \left (a+b x+c x^2\right )^{3/2}}{3 c e}+\frac {\int \frac {\left (\frac {3}{2} e \left (2 c e f^2-b d g^2\right )+\frac {3}{2} e g (4 c e f-2 c d g-b e g) x\right ) \sqrt {a+b x+c x^2}}{d+e x} \, dx}{3 c e^2} \\ & = -\frac {\left (b^2 e^2 g^2-8 c^2 (e f-d g)^2-2 b c e g (2 e f-d g)-2 c e g (4 c e f-2 c d g-b e g) x\right ) \sqrt {a+b x+c x^2}}{8 c^2 e^3}+\frac {g^2 \left (a+b x+c x^2\right )^{3/2}}{3 c e}-\frac {\int \frac {-\frac {3}{4} e \left (d \left (4 b c d-b^2 e-4 a c e\right ) g (4 c e f-2 c d g-b e g)-4 c e (b d-2 a e) \left (2 c e f^2-b d g^2\right )\right )-\frac {3}{4} e \left (\left (8 c^2 d^2-b^2 e^2-4 c e (b d-a e)\right ) g (4 c e f-2 c d g-b e g)-4 c e (2 c d-b e) \left (2 c e f^2-b d g^2\right )\right ) x}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{12 c^2 e^4} \\ & = -\frac {\left (b^2 e^2 g^2-8 c^2 (e f-d g)^2-2 b c e g (2 e f-d g)-2 c e g (4 c e f-2 c d g-b e g) x\right ) \sqrt {a+b x+c x^2}}{8 c^2 e^3}+\frac {g^2 \left (a+b x+c x^2\right )^{3/2}}{3 c e}+\frac {\left (\left (c d^2-b d e+a e^2\right ) (e f-d g)^2\right ) \int \frac {1}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{e^4}+\frac {\left (\left (8 c^2 d^2-b^2 e^2-4 c e (b d-a e)\right ) g (4 c e f-2 c d g-b e g)-4 c e (2 c d-b e) \left (2 c e f^2-b d g^2\right )\right ) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{16 c^2 e^4} \\ & = -\frac {\left (b^2 e^2 g^2-8 c^2 (e f-d g)^2-2 b c e g (2 e f-d g)-2 c e g (4 c e f-2 c d g-b e g) x\right ) \sqrt {a+b x+c x^2}}{8 c^2 e^3}+\frac {g^2 \left (a+b x+c x^2\right )^{3/2}}{3 c e}-\frac {\left (2 \left (c d^2-b d e+a e^2\right ) (e f-d g)^2\right ) \text {Subst}\left (\int \frac {1}{4 c d^2-4 b d e+4 a e^2-x^2} \, dx,x,\frac {-b d+2 a e-(2 c d-b e) x}{\sqrt {a+b x+c x^2}}\right )}{e^4}+\frac {\left (\left (8 c^2 d^2-b^2 e^2-4 c e (b d-a e)\right ) g (4 c e f-2 c d g-b e g)-4 c e (2 c d-b e) \left (2 c e f^2-b d g^2\right )\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{8 c^2 e^4} \\ & = -\frac {\left (b^2 e^2 g^2-8 c^2 (e f-d g)^2-2 b c e g (2 e f-d g)-2 c e g (4 c e f-2 c d g-b e g) x\right ) \sqrt {a+b x+c x^2}}{8 c^2 e^3}+\frac {g^2 \left (a+b x+c x^2\right )^{3/2}}{3 c e}+\frac {\left (\left (8 c^2 d^2-b^2 e^2-4 c e (b d-a e)\right ) g (4 c e f-2 c d g-b e g)-4 c e (2 c d-b e) \left (2 c e f^2-b d g^2\right )\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{16 c^{5/2} e^4}+\frac {\sqrt {c d^2-b d e+a e^2} (e f-d g)^2 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e^4} \\ \end{align*}
Time = 1.42 (sec) , antiderivative size = 316, normalized size of antiderivative = 0.97 \[ \int \frac {(f+g x)^2 \sqrt {a+b x+c x^2}}{d+e x} \, dx=\frac {\frac {2 e \sqrt {a+x (b+c x)} \left (-3 b^2 e^2 g^2+2 c e g (4 a e g+b (6 e f-3 d g+e g x))+4 c^2 \left (6 d^2 g^2-3 d e g (4 f+g x)+2 e^2 \left (3 f^2+3 f g x+g^2 x^2\right )\right )\right )}{c^2}+96 \sqrt {-c d^2+b d e-a e^2} (e f-d g)^2 \arctan \left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+x (b+c x)}}{\sqrt {-c d^2+e (b d-a e)}}\right )+\frac {3 \left (-b^3 e^3 g^2+16 c^3 d (e f-d g)^2+2 b c e^2 g (2 b e f-b d g+2 a e g)-8 c^2 e \left (b (e f-d g)^2+a e g (2 e f-d g)\right )\right ) \log \left (b+2 c x-2 \sqrt {c} \sqrt {a+x (b+c x)}\right )}{c^{5/2}}}{48 e^4} \]
[In]
[Out]
Time = 0.81 (sec) , antiderivative size = 570, normalized size of antiderivative = 1.75
method | result | size |
risch | \(\frac {\left (8 c^{2} e^{2} g^{2} x^{2}+2 b c \,e^{2} g^{2} x -12 c^{2} d e \,g^{2} x +24 c^{2} e^{2} f g x +8 a c \,e^{2} g^{2}-3 b^{2} e^{2} g^{2}-6 b c d e \,g^{2}+12 b c \,e^{2} f g +24 c^{2} d^{2} g^{2}-48 c^{2} d e f g +24 c^{2} e^{2} f^{2}\right ) \sqrt {c \,x^{2}+b x +a}}{24 c^{2} e^{3}}-\frac {\frac {16 \left (a \,d^{2} e^{2} g^{2}-2 a d \,e^{3} f g +f^{2} a \,e^{4}-b \,d^{3} e \,g^{2}+2 b \,d^{2} e^{2} f g -b d \,e^{3} f^{2}+d^{4} g^{2} c -2 c \,d^{3} e f g +c \,d^{2} e^{2} f^{2}\right ) c^{2} \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}+\frac {\left (4 a b c \,e^{3} g^{2}+8 a \,c^{2} d \,e^{2} g^{2}-16 a \,c^{2} e^{3} f g -b^{3} e^{3} g^{2}-2 b^{2} c d \,e^{2} g^{2}+4 b^{2} c \,e^{3} f g -8 b \,c^{2} d^{2} e \,g^{2}+16 b \,c^{2} d \,e^{2} f g -8 b \,c^{2} e^{3} f^{2}+16 c^{3} d^{3} g^{2}-32 c^{3} d^{2} e f g +16 c^{3} d \,e^{2} f^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{e \sqrt {c}}}{16 c^{2} e^{3}}\) | \(570\) |
default | \(-\frac {g \left (d g \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )-2 e f \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )-e g \left (\frac {\left (c \,x^{2}+b x +a \right )^{\frac {3}{2}}}{3 c}-\frac {b \left (\frac {\left (2 c x +b \right ) \sqrt {c \,x^{2}+b x +a}}{4 c}+\frac {\left (4 a c -b^{2}\right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {3}{2}}}\right )}{2 c}\right )\right )}{e^{2}}+\frac {\left (d^{2} g^{2}-2 d e f g +e^{2} f^{2}\right ) \left (\sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}+\frac {\left (b e -2 c d \right ) \ln \left (\frac {\frac {b e -2 c d}{2 e}+c \left (x +\frac {d}{e}\right )}{\sqrt {c}}+\sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\right )}{2 e \sqrt {c}}-\frac {\left (e^{2} a -b d e +c \,d^{2}\right ) \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}\right )}{e^{3}}\) | \(585\) |
[In]
[Out]
Timed out. \[ \int \frac {(f+g x)^2 \sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(f+g x)^2 \sqrt {a+b x+c x^2}}{d+e x} \, dx=\int \frac {\left (f + g x\right )^{2} \sqrt {a + b x + c x^{2}}}{d + e x}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {(f+g x)^2 \sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Exception generated. \[ \int \frac {(f+g x)^2 \sqrt {a+b x+c x^2}}{d+e x} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {(f+g x)^2 \sqrt {a+b x+c x^2}}{d+e x} \, dx=\int \frac {{\left (f+g\,x\right )}^2\,\sqrt {c\,x^2+b\,x+a}}{d+e\,x} \,d x \]
[In]
[Out]